package main

import (
	"fmt"
	"time"
)

func testTimeOut(){
	c1:= make(chan string,1)
	go func() {
		time.Sleep(time.Second * 1)
		c1 <- "result 1"
	}()

	select {
	case res:=<-c1:
		fmt.Println(res)
	case <-time.After(time.Second *2):
		fmt.Println("time out 1")
	}
}